<input name="captcha" id="captcha" type="text" size="6" onfocus="showcaptcha();" value="点击显示" onkeyup="checkcaptcha(this.value);" onblur="checkcaptcha(this.value);" class="login17426" />&nbsp;<img src="{AJ_SKIN}image/loading.gif" title="验证码,看不清楚?请点击刷新&#10;字母不区分大小写" alt="" align="absmiddle" id="captchapng" onclick="reloadcaptcha();" style="display:none;cursor:pointer;"/><span id="ccaptcha"></span>
<script type="text/javascript">
function showcaptcha() {
	if(Dd('captchapng').style.display=='none') {
		Dd('captchapng').style.display='';
	}
	if(Dd('captchapng').src.indexOf('loading.gif') != -1) {
		Dd('captchapng').src='{AJ_PATH}api/captcha.png.php?action=image';
	}
	if(Dd('captcha').value=='点击显示') {
		Dd('captcha').value='';
	}
	Dd('captcha').className = '';
}
function reloadcaptcha() {
	Dd('captchapng').src = '{AJ_PATH}api/captcha.png.php?action=image&refresh='+Math.random();
	Dd('ccaptcha').innerHTML = '';
	Dd('captcha').value = '';
}
function checkcaptcha(s) {
	if(!is_captcha(s)) return;
	makeRequest('action=captcha&captcha='+s, DTPath, '_checkcaptcha');
}
function _checkcaptcha() {    
	if(xmlHttp.readyState==4 && xmlHttp.status==200) {
		if(xmlHttp.responseText == '0') {
			Dd('ccaptcha').innerHTML = '&nbsp;&nbsp;<img src="{AJ_SKIN}image/check_right.gif" align="absmiddle"/>';
		} else {
			Dd('captcha').focus;
			Dd('ccaptcha').innerHTML = '&nbsp;&nbsp;<img src="{AJ_SKIN}image/check_error.gif" align="absmiddle"/>';
		}
	}
}
</script>